//
//  AboutScene.m
//  iSuDoku
//
//  Created by maccctk on 09-7-6.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import "AboutScene.h"
#import "MenuScene.h"

@implementation AboutScene

- (id)init {
	self = [super init];
	if(self != nil) {
		[self addChild:[AboutLayer node] z:0];
	}
	return self;
}

@end

@implementation AboutLayer

- (id)init {
	self = [super init];
	if(self != nil) {
		isTouchEnabled = YES;
		
		Sprite *bg = [Sprite spriteWithFile:@"game.png"];
		[bg setPosition:ccp(240, 160)];
		[self addChild:bg z:0];
		
		Label *label = [Label labelWithString:
						@"iSoDoKu\n"
						"        -- 3th software production of nonoleaves.\n"
						"\n"
						"Hope this software may be beneficial for you more or less.\n"
						"If you find any error or have any advice, feel free to send email to me:\n"
						"        nonoleaves@gmail.com\n"
						"\n"
						"Thanks!"
								   dimensions: CGSizeMake(320, 320)
									alignment: UITextAlignmentLeft
									 fontName:@"Helvetica" fontSize:11];
		[label setPosition:ccp(240, 100)];
		[label setRGB:0 :0 :0];
		[self addChild:label z:0];
	}
	return self;
}

- (BOOL)ccTouchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
	MenuScene *ms = [MenuScene node];
	[[Director sharedDirector] replaceScene:ms];	
	return YES;
}

@end